{$form.javascript}
<form {$form.attributes} onsubmit="return validation();">
  <table width="100%" border="0" cellspacing="0" cellpadding="4" class="form">
    <thead>
    <tr>
      <td colspan="4">
	  	{t}Order details{/t}
        {$form.hidden}
	  </td>
	</tr>
	</thead>
	<tbody>
    <tr>
      <td width="25%"><strong>{$form.Command_CommandNo.label}: </strong></td>
      <td width="25%">{$form.Command_CommandNo.html}</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td valign="top"><span style="color:#f00;font-weight:bold;">*&nbsp;</span><strong>{t}Wished date{/t}:</strong></td>
      <td valign="top"><p>
          <label>
          <input type="radio" name="WishedDate" value="0" {if $WishedDate == 0}checked="checked"{/if}
              onclick="fw.dom.toggleElement('WishedStartDate',true);fw.dom.toggleElement('WishedEndDate',false);" />
          {t}Date{/t}</label>
          <label><br/>
          <input type="radio" name="WishedDate" value="1" {if $WishedDate == 1}checked="checked"{/if}
              onclick="fw.dom.toggleElement('WishedStartDate',true);fw.dom.toggleElement('WishedEndDate',true);" />
          {t}Date range{/t}</label>
          <br /><br/>
        </p></td>
      <td colspan="2" valign="top">
	    <table>
          <tr>
            <td><div id="WishedStartDate"><span id="show_Date1"
				style="background-color:#E1E8EF;border:1px #000000 dotted;
				margin: 3px 3px 3px 3px;padding: 3px 3px 3px 3px;text-align: right;">
				{if $FWishedStartDate!=0}{$FWishedStartDate}{else}-- {t}Select a date{/t} --{/if}
				</span>
                <input type="hidden" name="Command_WishedStartDate" id="f_date_c1" value="{$WishedStartDate}" />
                &nbsp;<input type="button" name="f_trigger_c1" id="f_trigger_c1" value="..."
                style="cursor: pointer;" title="{t}Select a date{/t}" />
				</div>
			</td>
          </tr>
          <tr>
            <td><div id="WishedEndDate"><span id="show_Date2"
				style="background-color:#E1E8EF;border:1px #000000 dotted;
				margin: 3px 3px 3px 3px;padding: 3px 3px 3px 3px;text-align: right;">
				{if $FWishedEndDate!=0}{$FWishedEndDate}{else}-- {t}Select a date{/t} --{/if}
				</span>
                <input type="hidden" name="Command_WishedEndDate" id="f_date_c2" value="{$WishedEndDate}" />
                &nbsp;<input type="button" name="f_trigger_c2" id="f_trigger_c2" value="..."
                style="cursor: pointer;" title="{t}Select a date{/t}" />
				</div>
            {literal}
            <script type="text/javascript">
//<![CDATA[
			Calendar.setup({
		        inputField     :    "f_date_c1",         // id of the input field (hidden)
		        ifFormat       :    "%Y-%m-%d %H:%M:00",  // format of the input field
				displayArea    :    "show_Date1",         // ID of the span where the date is to be shown
				daFormat       :    "%A %e %B %Y %H:%M",  // format of the displayed date
		        button         :    "f_trigger_c1",       // trigger for the calendar (button ID)
		        align          :    "Tl",                 // alignment (defaults to "Bl")
				date		   :	"", // date affichee par defaut
		        singleClick    :    true,
				dateStatusFunc :	calendarDisableFunc   // permet d'afficher des dates speciales diffaremment (jours feries)
														  // et d'en desactiver (en fonction du planning de l'Actor
		    });
			Calendar.setup({
		        inputField     :    "f_date_c2",     	  // id of the input field
		        ifFormat       :    "%Y-%m-%d %H:%M:00",  // format of the input field
				displayArea    :    "show_Date2",         // ID of the span where the date is to be shown
				daFormat       :    "%A %e %B %Y %H:%M",  // format of the displayed date
		        button         :    "f_trigger_c2",  	  // trigger for the calendar (button ID)
		        align          :    "Tl",           	  // alignment (defaults to "Bl")
				date		   :	"", // date affichee par defaut
		        singleClick    :    true,
				dateStatusFunc :	dateStatusHandler
		    });
//]]>
			</script>
            {/literal}
			</td>
            </tr>
        </table>
	  </td>
    </tr>
    <tr>
      <td colspan="4">&nbsp;{$form.cmdComment.label}</td>
    </tr>
	</tbody>
    <tfoot>
    <tr>
      <td align="right" colspan="4">
        <input type="submit" name="commandButton" value="{t}Ok{/t}" class="Button"/>
		&nbsp;
        <input name="annuler" type="button" onclick="window.location='{$retURL}'"
          value="{t}Cancel{/t}" class="Button" />
      </td>
    </tr>
	</tfoot>
  </table>
</form>
